<?php
    require("../models/webconfig.php");
    require("../models/class.connection.php");
    require("../models/repositories/class.CategoryRepository.php");
    $categoryRepository = new CategoryRepository();
    if(isset($_POST['categoryID']))
    { 
        $categoryID = $_POST['categoryID'];
    } 
    else 
        exit();
    if($categoryRepository->Delete($categoryID) > 0){
        echo "1";
    }
    else{
        echo "0";
    }
?>